
#ifndef WF_GETPOINT_H
#define WF_GETPOINT_H

#include "pf_previewactioninterface.h"
#include "pf_modification.h"


/**
 * This action class can handle user events to get a point from plugin.
 */
class WF_GetPoint : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetReferencePoint,    /**< Setting the reference point. */
        SetTargetPoint       /**< Setting the target point. */
    };

public:
    WF_GetPoint(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_GetPoint() {}

    virtual void init(int status=0);
	
    virtual void trigger();
	
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

    void getPoint(QPointF *point);
    void setBasepoint(QPointF* basepoint);
    void setMesage(QString msg);

private:
    PF_MoveAttribute data;
    PF_Vector referencePoint;
    PF_Vector targetPoint;
    bool completed;
    QString mesage;
};

#endif
